package br.com.lazyprogrammer.worldsoccermanager.network.model.dao;

import android.content.Context;
import android.os.AsyncTask;

import br.com.lazyprogrammer.worldsoccermanager.network.Request;
import br.com.lazyprogrammer.worldsoccermanager.network.interfaces.TeamListener;
import br.com.lazyprogrammer.worldsoccermanager.network.task.GetTeamTask;

/**
 * Created by LimaoGames on 7/9/2014.
 */
public class TeamDAO {

    private GetTeamTask getTeamTask;

    public void get(Context context, Request.Callback callback, TeamListener listener, String userId) {
        getTeamTask = new GetTeamTask(context, callback, listener);
        getTeamTask.execute(userId);
    }

    public boolean isGetTeamTaskRunning() {
        return getTeamTask != null && getTeamTask.getStatus() != AsyncTask.Status.FINISHED;
    }

}
